package com.hongxia.assetsys.domain;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName tb_task_exploit
 */
@TableName(value ="tb_task_exploit")
@Data
public class TaskExploit implements Serializable {
    /**
     * 
     */
    @TableId
    private Integer id;

    /**
     * 
     */
    private Integer mytaskId;

    /**
     * 
     */
    private String exploitname;

    /**
     * 
     */
    private String exploitvul;

    /**
     * 
     */
    private String tester;

    /**
     * 
     */
    private Date explittime;

    /**
     * 
     */
    private String targetip;

    /**
     * 
     */
    private String exploitresult;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TaskExploit other = (TaskExploit) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getMytaskId() == null ? other.getMytaskId() == null : this.getMytaskId().equals(other.getMytaskId()))
            && (this.getExploitname() == null ? other.getExploitname() == null : this.getExploitname().equals(other.getExploitname()))
            && (this.getExploitvul() == null ? other.getExploitvul() == null : this.getExploitvul().equals(other.getExploitvul()))
            && (this.getTester() == null ? other.getTester() == null : this.getTester().equals(other.getTester()))
            && (this.getExplittime() == null ? other.getExplittime() == null : this.getExplittime().equals(other.getExplittime()))
            && (this.getTargetip() == null ? other.getTargetip() == null : this.getTargetip().equals(other.getTargetip()))
            && (this.getExploitresult() == null ? other.getExploitresult() == null : this.getExploitresult().equals(other.getExploitresult()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getMytaskId() == null) ? 0 : getMytaskId().hashCode());
        result = prime * result + ((getExploitname() == null) ? 0 : getExploitname().hashCode());
        result = prime * result + ((getExploitvul() == null) ? 0 : getExploitvul().hashCode());
        result = prime * result + ((getTester() == null) ? 0 : getTester().hashCode());
        result = prime * result + ((getExplittime() == null) ? 0 : getExplittime().hashCode());
        result = prime * result + ((getTargetip() == null) ? 0 : getTargetip().hashCode());
        result = prime * result + ((getExploitresult() == null) ? 0 : getExploitresult().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", mytaskId=").append(mytaskId);
        sb.append(", exploitname=").append(exploitname);
        sb.append(", exploitvul=").append(exploitvul);
        sb.append(", tester=").append(tester);
        sb.append(", explittime=").append(explittime);
        sb.append(", targetip=").append(targetip);
        sb.append(", exploitresult=").append(exploitresult);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}